<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('面试评价表新增及修改')" />
	<th:block th:include="include :: businessCSS" />
</head>
<body class="no-skin">
<div class="main-container" id="main-container">
	<div class="main-content">
	<form class="layui-form head-form">
	    <div class="north">
            <th:block th:include="include :: business_btn" />
	        <th:block th:include="include :: business_tpl('top')" />
			<!-- 静态表格 -->
		    <div style="margin:10px">
			  	<table class="layui-table" lay-size="sm">
			    <colgroup>
			      <col width="10%">
			      <col width="15%">
			      <col width="15%">
			      <col width="20%">
			      <col width="20%">
			      <col width="20%">
			    </colgroup>
				<thead>
			      <tr>
			        <th colspan="6">面试评价表</th>
			      </tr> 
			    </thead>
			    <tbody>
		    	  <tr>
			        <td class="table-title">面试时间</td>
			        <td><input type="text" id="dMsSj" name="dMsSj" autocomplete="off" readonly class="layui-input" lay-verify="date" placeholder="请选择时间"/></td>
			        <td class="table-title"><font class="f_red">*</font>面试官</td>
			        <td class="canntEdit"><input type="text" id="vMsg" name="vMsg" autocomplete="off" class="layui-input canntEdit" lay-verify="required" readonly></td>
			        <td class="table-title"><font class="f_red">*</font>工作区域</td>
			        <td><input type="text" id="vGzQy" name="vGzQy" autocomplete="off" class="layui-input" lay-verify="required"></td>
			      </tr>
		    	  <tr>
			        <td class="table-title"><font class="f_red">*</font>应聘者姓名</td>
			        <td><input type="text" id="vYpzXm" name="vYpzXm" autocomplete="off" class="layui-input" lay-verify="required"></td>
			        <td class="table-title"><font class="f_red">*</font>应聘部门</td>
			        <td><input type="text" id="vYpBm" name="vYpBm" autocomplete="off" class="layui-input" lay-verify="required"></td>
			        <td class="table-title"><font class="f_red">*</font>应聘岗位</td>
			        <td th:if="${!gridColumns.readOnly}">
			        	<input type="text" id="vYpGw" name="vYpGw" class="layui-input" autocomplete="off" lay-verify="required"/>
			        	<i class="layui-icon layui-icon-more getMore" style="position:absolute" onclick="getMore('vYpGw',null,'应聘岗位','ts_roleinfo');"></i>
		        	</td>
		        	<td th:if="${gridColumns.readOnly}">
			        	<input type="text" id="vYpGw" name="vYpGw" class="layui-input" readonly/>
		        	</td>
			      </tr>
			      </tbody>
				<thead>
			      <tr>
			        <th colspan="4">用人部门评估</th>
			        <th colspan="2">评价</th>
			      </tr> 
			    </thead>
			    <tbody>
		    	  <tr>
			        <td class="table-title">工作经验</td>
			        <td class="table-title text_l" colspan="3">对岗位的理解、与岗位相关的工作经验、个人工作经历</td>
			        <td colspan="2">
						<input type="radio" name="vGzJy" value="1" title="完全合适">
			        	<input type="radio" name="vGzJy" value="2" title="较合适">
			        	<input type="radio" name="vGzJy" value="3" title="基本合适">
			        	<input type="radio" name="vGzJy" value="4" title="不合适">
					</td>
			      </tr>
		    	  <tr>
			        <td class="table-title">专业知识</td>
			        <td class="table-title text_l" colspan="3">掌握一定本岗位所需的专业理论知识、能较好的应用所掌握的直接技能，并具备较丰富的实际经验</td>
			        <td colspan="2">
						<input type="radio" name="vZyZs" value="1" title="完全合适">
			        	<input type="radio" name="vZyZs" value="2" title="较合适">
			        	<input type="radio" name="vZyZs" value="3" title="基本合适">
			        	<input type="radio" name="vZyZs" value="4" title="不合适">
					</td>
			      </tr>
		    	  <tr>
			        <td class="table-title">工作技能</td>
			        <td class="table-title text_l" colspan="3">具有良好的团队协作能力、执行力、计划性、条理性</td>
			        <td colspan="2">
						<input type="radio" name="vGzJn" value="1" title="完全合适">
			        	<input type="radio" name="vGzJn" value="2" title="较合适">
			        	<input type="radio" name="vGzJn" value="3" title="基本合适">
			        	<input type="radio" name="vGzJn" value="4" title="不合适">
					</td>
			      </tr>
		    	  <tr>
			        <td class="table-title">企业认知</td>
			        <td class="table-title text_l" colspan="3">对行业以及本企业的了解程度，对企业文化的认可程度</td>
			        <td colspan="2">
						<input type="radio" name="vQyRz" value="1" title="完全合适">
			        	<input type="radio" name="vQyRz" value="2" title="较合适">
			        	<input type="radio" name="vQyRz" value="3" title="基本合适">
			        	<input type="radio" name="vQyRz" value="4" title="不合适">
					</td>
			      </tr>
		    	  <tr>
			        <td class="table-title">发展潜力</td>
			        <td class="table-title text_l" colspan="3">具有较强的沟通能力、学习能力、抗压能力、管理能力</td>
			        <td colspan="2">
						<input type="radio" name="vFzQl" value="1" title="完全合适">
			        	<input type="radio" name="vFzQl" value="2" title="较合适">
			        	<input type="radio" name="vFzQl" value="3" title="基本合适">
			        	<input type="radio" name="vFzQl" value="4" title="不合适">
					</td>
			      </tr>
		    	  <tr>
			        <td class="table-title" rowspan="2">优劣势分析</td>
			        <td class="table-title text_r">优势分析：</td>
			        <td colspan="4"><input type="text" id="vYsFx" name="vYsFx" autocomplete="off" class="layui-input"></td>
			      </tr>
		    	  <tr>
			        <td class="table-title text_r">劣势分析：</td>
			        <td colspan="4"><input type="text" id="vLsFx" name="vLsFx" autocomplete="off" class="layui-input"></td>
			      </tr>
		    	  <tr>
			        <td class="table-title" rowspan="2">用人部门综评</td>
			        <td class="table-title text_r">岗位匹配度（%）：</td>
			        <td><input type="text" id="fGwPpd" name="fGwPpd" autocomplete="off" class="layui-input"></td>
			        <td class="table-title text_r">建议薪资（K）：</td>
			        <td><input type="number" id="fJyXz1" name="fJyXz1" autocomplete="off" class="layui-input" placeholder="提示：填写薪资下限，不小于0" min="0"></td>
			        <td><input type="number" id="fJyXz2" name="fJyXz2" autocomplete="off" class="layui-input" placeholder="提示：填写薪资上限，不小于0" min="0"></td>
			      </tr>
			      <tr>
			        <td class="table-title text_r">面试结果：</td>
			        <td colspan="2">
			        	<input type="radio" name="vMsJg1" value="1" title="录用">
			        	<input type="radio" name="vMsJg1" value="2" title="不录用">
			        	<input type="radio" name="vMsJg1" value="3" title="其他">
		        	</td>
		        	<td colspan="2"><input type="text" id="vMsJg1" autocomplete="off" class="layui-input" placeholder="提示：其他原因（选填）"></td>
			      </tr>
		      	</tbody>
		      	<!-- 以下为流转后人事部门填写 -->
				<thead th:if="${gridColumns.readOnly}">
			      <tr>
			        <th colspan="4">人事部门评估</th>
			        <th colspan="2">评价</th>
			      </tr> 
			    </thead>
			    <tbody th:if="${gridColumns.readOnly}">
		    	  <tr>
			        <td class="table-title">个人特质</td>
			        <td class="table-title text_l" colspan="3">言行举止大方得体，态度诚恳，语气恰当</td>
			        <td colspan="2">
						<input type="radio" name="vGrTz" value="1" title="完全合适">
			        	<input type="radio" name="vGrTz" value="2" title="较合适">
			        	<input type="radio" name="vGrTz" value="3" title="基本合适">
			        	<input type="radio" name="vGrTz" value="4" title="不合适">
					</td>
			      </tr>
		    	  <tr>
			        <td class="table-title">学历教育</td>
			        <td class="table-title text_l" colspan="3">学历情况、专业情况、所受培训及工作经验符合岗位需求</td>
			        <td colspan="2">
						<input type="radio" name="vXlJy" value="1" title="完全合适">
			        	<input type="radio" name="vXlJy" value="2" title="较合适">
			        	<input type="radio" name="vXlJy" value="3" title="基本合适">
			        	<input type="radio" name="vXlJy" value="4" title="不合适">
					</td>
			      </tr>
		    	  <tr>
			        <td class="table-title">稳定性</td>
			        <td class="table-title text_l" colspan="3">离职原因、求职目标、个人职业规划、个人生活及家庭状况</td>
			        <td colspan="2">
						<input type="radio" name="vWdX" value="1" title="完全合适">
			        	<input type="radio" name="vWdX" value="2" title="较合适">
			        	<input type="radio" name="vWdX" value="3" title="基本合适">
			        	<input type="radio" name="vWdX" value="4" title="不合适">
					</td>
			      </tr>
			      <tr>
			      	<td class="table-title">人事部门综评</td>
			        <td class="table-title text_r">面试结果：</td>
			        <td colspan="2">
			        	<input type="radio" name="vMsJg2" value="1" title="录用">
			        	<input type="radio" name="vMsJg2" value="2" title="不录用">
			        	<input type="radio" name="vMsJg2" value="3" title="其他">
		        	</td>
		        	<td colspan="2"><input type="text" id="vMsJg2" autocomplete="off" class="layui-input" placeholder="提示：其他原因（选填）"></td>
			      </tr>
			    </tbody>
			  </table>
		  	</div>
    	</div>
	   	<th:block th:include="include :: pageFooter" /> 
	   	<input class="layui-hide" type="button" lay-submit="" id="btn_save">
        </form>
	</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: businessJS" />
<th:block th:include="include :: businessTableBtn" />
<th:block th:include="include :: inlineJS" />
<script type="text/javascript">
var $,layer,form,laydate,element;//定义layui模块
var nid = $("#nid").val(),noTable;//定义全局参数
layui.use(['laydate','form','layer','jquery','util','element'], function () {
 	$ = layui.$,layer = layui.layer,form = layui.form,laydate = layui.laydate,util = layui.util,element=layui.element;
 	$.each(t_fields,function(v,k){//初始赋值
 		if((k.fields=="vGzJy" || k.fields=="vZyZs" || k.fields=="vGzJn" || k.fields=="vMsJg1" || k.fields=="vMsJg2" 
 				|| k.fields=="vQyRz" || k.fields=="vFzQl" || k.fields=="vGrTz" || k.fields=="vXlJy" || k.fields=="vWdX") && k.fieldContent){
 			$("input[name="+k.fields+"][value="+k.fieldContent+"]").attr("checked",true);
 			if(gridColumns.readOnly)$("input[name="+k.fields+"]").attr('disabled','disabled');
 		}else $('#'+k.fields).val(k.fieldContent);
 		if((k.fields=="vMsJg1" || k.fields=="vMsJg2") && k.fieldContent != 1 && k.fieldContent !=2)$('#'+k.fields).val(k.fieldContent);
 	})
 	beforeInit();//表单初始化之前的动作集合
 	if(!gridColumns.readOnly)laydate.render({elem:'#dMsSj'});
 	layui.element.render();
 	$.get("/hr/interviewresults/listbynid?nid="+nid,function(res){
 		noTable=res.data;
	});
 	if(gridColumns.readOnly){//流程结束后静态表格变为不可编辑
 	 	$('table input').attr('readonly','readonly');
		$('table .canntEdit').removeClass('canntEdit');
 	}
 	form.render();
 	//以下页面定制js
 	$('#vMsJg1').change(function(){
 		$("input[name=vMsJg1]").last().click();
 		$("input[name=vMsJg1]").last().val($('#vMsJg1').val());
 	 	form.render();
 	})
 	$('#vMsJg2').change(function(){
 		$("input[name=vMsJg2]").last().click();
 		$("input[name=vMsJg2]").last().val($('#vMsJg2').val());
 	 	form.render();
 	})
})
function beforeSave(tableData){
	$('#btn_save').click();
	form.on('submit()',function(data){//监听保存，通过则直接返回tableData
		tpBtnClick('tpSave',false);
	})
	return false;
}
</script>
</body>
</html>